home *** CD-ROM | disk | FTP | other *** search
/ Popular Request / By Popular Request (Arsenal Computer)(SysOptics Distribution System).ISO / amiga3 / pltbak01.lha / PlutBack.LST < prev   
File List  |  1993-10-21  |  1KB  |  56 lines

  1. ' PlutBack
  2. '
  3. ' ".CFG" backup program
  4. '
  5. ' By Peter Deane
  6. '
  7. versdate$="21-Oct-93"
  8. versnum$="0.1"
  9. '
  10. OPEN "O",#1,"*",24
  11. PRINT #1,""
  12. PRINT #1,"PlutBack V "+versnum$+" ("+versdate$+")"+" by PFD @3:622/401"
  13. PRINT #1,""
  14. RELSEEK #1,-1
  15. c.line$=_dosCmd$
  16. c.line$=TRIM$(c.line$)
  17. '
  18. IF c.line$=""
  19.   path$="Mail:"
  20. ELSE
  21.   IF RIGHT$(c.line$,1)<>"/" AND RIGHT$(c.line$,1)<>":"
  22.     c.line$=c.line$+"/"
  23.   ENDIF
  24.   path$=c.line$
  25. ENDIF
  26. '
  27. cfgfound%=0
  28. '
  29. DIR path$ TO "RAM:PlutBack.tmp"
  30. IF EXIST("RAM:PlutBack.tmp")
  31.   OPEN "I",#4,"RAM:PlutBack.tmp",1024
  32.   WHILE NOT EOF(#4)
  33.     '
  34.     LINE INPUT #4,xx$
  35.     IF LEN(xx$)>4
  36.       xxq$=RIGHT$(xx$,4)
  37.       xxq$=UPPER$(xxq$)
  38.       IF xxq$=".CFG"
  39.         INC cfgfound%
  40.         exxe$="Copy "+CHR$(34)+path$+xx$+CHR$(34)+" to "+CHR$(34)+path$+xx$+"-bak"+CHR$(34)
  41.         PRINT #1,exxe$
  42.         RELSEEK #1,-1
  43.         EXEC exxe$,-1,-1
  44.       ENDIF
  45.     ENDIF
  46.   WEND
  47.   CLOSE #4
  48.   KILL "RAM:PlutBack.tmp"
  49. ENDIF
  50. '
  51. PRINT #1,""
  52. PRINT #1,"Found "+STR$(cfgfound%)+" config files in path '"+path$+"'."
  53. CLOSE #1
  54. END
  55. '
  56.